package com.medisched.medisched.service.impl;

import com.medisched.medisched.domain.Holiday;
import com.medisched.medisched.mapper.HolidayMapper;
import com.medisched.medisched.service.IHolidayService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * 假期Service业务层处理
 * 
 * @author ruoyi
 * @date 2025-05-15
 */
@Service
public class HolidayServiceImpl implements IHolidayService
{
    @Autowired
    private HolidayMapper holidayMapper;

    /**
     * 查询假期
     * 
     * @param id 假期主键
     * @return 假期
     */
    @Override
    public Holiday selectHolidayById(Long id)
    {
        return holidayMapper.selectHolidayById(id);
    }

    /**
     * 查询假期列表
     * 
     * @param holiday 假期
     * @return 假期
     */
    @Override
    public List<Holiday> selectHolidayList(Holiday holiday)
    {
        return holidayMapper.selectHolidayList(holiday);
    }

    /**
     * 新增假期
     * 
     * @param holiday 假期
     * @return 结果
     */
    @Override
    public int insertHoliday(Holiday holiday)
    {
        return holidayMapper.insertHoliday(holiday);
    }

    /**
     * 修改假期
     * 
     * @param holiday 假期
     * @return 结果
     */
    @Override
    public int updateHoliday(Holiday holiday)
    {
        return holidayMapper.updateHoliday(holiday);
    }

    /**
     * 批量删除假期
     * 
     * @param ids 需要删除的假期主键
     * @return 结果
     */
    @Override
    public int deleteHolidayByIds(Long[] ids)
    {
        return holidayMapper.deleteHolidayByIds(ids);
    }

    /**
     * 删除假期信息
     * 
     * @param id 假期主键
     * @return 结果
     */
    @Override
    public int deleteHolidayById(Long id)
    {
        return holidayMapper.deleteHolidayById(id);
    }
}
